import PropTypes from "prop-types";

const locationShape = PropTypes.shape({
    pathname: PropTypes.string.isRequired,
    search: PropTypes.string,
    hash: PropTypes.string,
    state: PropTypes.object,
    key: PropTypes.string,
});

const historyShape = PropTypes.shape({
    length: PropTypes.number.isRequired,
    action: PropTypes.string.isRequired,
    location: locationShape.isRequired,
    push: PropTypes.func.isRequired,
    replace: PropTypes.func.isRequired,
    go: PropTypes.func.isRequired,
    goBack: PropTypes.func.isRequired,
    goForward: PropTypes.func.isRequired,
    block: PropTypes.func.isRequired,
    listen: PropTypes.func.isRequired,
    createHref: PropTypes.func.isRequired,
});

const storeShape = PropTypes.shape({
    project: PropTypes.array,
    user: PropTypes.shape({
        token: PropTypes.string,
        userData: PropTypes.object,
        sysList: PropTypes.array,
        activeSystem: PropTypes.object,
        menuList: PropTypes.array,
        activeMenu: PropTypes.object,
        activeTabsMenu: PropTypes.array,
        roleMenu: PropTypes.array,
        staticMockMenu: PropTypes.array,
        basicBusinessDataList: PropTypes.array,
        basicBusinessDataList2: PropTypes.array,
    }),
});

export { locationShape, historyShape, storeShape };
